/**
 * created the 5 oct. 07
 */
package choco.global.scheduling.trees;

import choco.global.scheduling.trees.abstrees.AbstractNodeInfo;
import choco.global.scheduling.trees.abstrees.AbstractThetaTree;
import choco.integer.IntDomainVar;

/**
 * @author Arnaud Malapert (arnaud.malapert@emn.fr)
 *
 */
public class CumTreeT extends AbstractThetaTree {

	private final int capacity;
	
	

	/**
	 * @param vars
	 * @param energy
	 * @param ectOrLst
	 */
	public CumTreeT(IntDomainVar[] vars, long[] energy,boolean ectOrLst,int capacity) {
		super(vars, energy, ectOrLst);
		this.capacity=capacity;
	}



	/**
	 * @see choco.global.scheduling.trees.abstrees.AbstractTree#createEmptyNodeInfo()
	 */
	@Override
	protected AbstractNodeInfo createEmptyNodeInfo() {
		CumNodeInfoT infos=new CumNodeInfoT();
		infos.setCapacity(capacity);
		return infos;
	}
	
	public final long getEnergy() {
		return root.infos.getLongValue(0);
	}

}
